package com.poh.service.impl;

import com.poh.mapper.UHScoreMapper;
import com.poh.pojo.UHScore;
import com.poh.service.UHScoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UHScoreServiceImpl implements UHScoreService {
    @Autowired
    UHScoreMapper uhScoreMapper;
    @Override
    public int addUHScore(UHScore uhScore) {
        return uhScoreMapper.addUHScore(uhScore);
    }

    @Override
    public UHScore queryUHScoreByHomeworkId(String homeworkId, int userId) {
        return uhScoreMapper.queryUHScoreByHomeworkId(homeworkId, userId);
    }

    @Override
    public int updateHomeworkScoreByUHId(UHScore uhScore) {
        return uhScoreMapper.updateHomeworkScoreByUHId(uhScore);
    }

    @Override
    public List<UHScore> queryHomeworkByCourseId(int courseId, int userId) {
        return uhScoreMapper.queryHomeworkByCourseId(courseId, userId);
    }
}
